<?php
function __autoload($classname)
{
	if(strpos($classname,"PM_") === 0){
		include(constant('PATH_SERVICE_CLASS').'/'.$classname.'.php');
	}
	else if($classname == 'XML')
	{
		include_once(constant('PATH_INCLUDE').'/lib.xml.php');
	}else if($classname == 'AppMain')
	{
		include_once(constant('PATH_INCLUDE').'/class.appmain.php');
	}
	else if($classname == 'Services_JSON')
	{
		include_once(constant('PATH_INCLUDE').'/class.json.php');
	}
	else if($classname == 'Util')
	{
		include_once(constant('PATH_INCLUDE').'/class.util.php');
	}
	else if($classname == 'SessionUtil')
	{
		include_once(constant('PATH_INCLUDE').'/class.sessionutil.php');
	}
	else if($classname == 'DataTable')
	{
		
		include_once(constant('PATH_INCLUDE').'/class.datatable.php');
	}
	else if(strpos($classname,"Order_") === 0)
	{
		include(constant('PATH_INCLUDE').'/order/'.$classname.'.class.php');
	}
	else if(strpos($classname,"Catalog_") === 0)
	{
		include(constant('PATH_INCLUDE').'/catalog/'.$classname.'.class.php');
	}else if(strpos($classname,"GB") === 0)
	{
		include(constant('PATH_INCLUDE').'/gbclean/'.$classname.'.class.php');
	}
}
?>